Added some functions to the Controller