added more stuff to the check mouse function