added event loop and smooth translate on mouse up