working on repositories rest functions