further refinements and added changes to shell sort