rewrite, removed mouse grabs