better handling of mouse move