added mouse dragged code