reworked repository classes