magic for keys and more tests and such