added a get function and passing tests