initial restructuring of repo