repository refactoring - non compiling