finished the rest function for repositories