tweaks to keygen