working on debug scripts