move to event listener, place keygen within asym