added dependency injection