updated for merge of relevant scripts into master