Made input draggeable
Simplified code