manage panel logic