fixes to search, and updating common/sort
udpates to merge, selection and insertion