repository design patter