slight updates to code, plus a new master example script