added codes for ioc in controller