added tests for keygen