add debug scripts from old script