added methods in main controller