modified MainFrame