updated MainCtrl controller and tests