changed returntype of retrieve to HasSet, to get rid of duplicate
entries from neighboured subtrees