use mouse state properly (?)