added toggle functionality with the ajax controller.