implemented my-drop-while function