added documentation to controller