now use repositories and dependency injection