better error checking and some code refactor like turning getkey into a function
added a version number for no reason
put version number back
roll back temporarily to stable version