added get metric function and removed key pair code