begin cleaning up mouse event code