updated controller to use config promise