clean up
tried to implement key events