readded panel logic