modified controller for reading and using config