adding send_keypairs function