added dependency injection in controllers