improve and refactore panel (WIP)