remove keypair lookup
fix problem with single elements returned instead of arrays