made changes to appcontroller