Finalized and tested with comments.  Similar to the makeVector function example