remove debug section, needs rewriting