refactoring for panels
panel hell