changed all fxns to use getkey fxn
getkey fxn takes a key as input, or if null uses a default key provided
added tests for many fxns
still more tests to add...