implemented constructor injection with params