updating mouse handler