outsource the drag in a method, clean and comment the code