shell sort method without class