updated the appcontroller