working on rest function for repositories