revisions to controller.m