finished moses script, runs with arbitrary data sets now