working scripts, broken out into modules