restructuring the repo