Separated registerRepository method