Uptimize mouse pointer algorithm