added some functions to the controllers