repository package implemented with unit tests