Add get function and tests