repaired example scripts after refactor