- refactoring the panel object