shell sort implementation