added a get method for getting a value of a key of the object