changed mouse logic to opposite