trying to implement a check repo function. Failed