added methods in main controller
added methods in main controller