working on panel optimization