continuing assignment, completeing part 2

rewrote the object a different way, passing an object into a functions
parameter