modify integrate_main, added console.log to see whether the controller has what we want