moved getrepos in here