Added more functions to aid the controller