add_keypairs: simplification