added mouse motion support