made changes to allow dependency injection
included autowired annotation