optimized mousemove event