added repository and unit tests for it