refactor main frame to have four panels