added a limit to dt
added mouse support