adding debugging statements
abstracting drag handler for mouse and touch