WIP: working keygen