added repository pattern and unit of work