rewrite of repo adding