Implemented drag functionality