clean up the code mouse still jittery