Lab 2 updated.

Lab 2 updated: functions performing same task as the script have been
created.  Should fulfill all requirements of the lab.  No further work
expected on this.