some random logic for avoiding mouse