improving mouse function
finished more efficient function
'update'