updated repository class