adding nice functions to controllers