added drag function to slider