Added function calls to controller