(fix) re-factored switch into ifs
(add) mouse dragging is now supported