update mouse function