added more functionalities for the controllers of API