commented code for controllers