some panel logic