Improved mouse example