refactoring, add panel