added protected debugging