completed the scanning repositories function