cleaned upp moveslide function