initial code commit
Fixed bug in script.

Final version to turn in.