commented the controller code