fixed example scripts to match recent changes