fixed keypair generator
order fixes, prepared for using java-formula