added functionality to controller