Added a get function and test for it