Added in my version of the Assignment 2 functions.