update
key and mouse handler, now ready to implement function