completed the repositories functions