rough draft-- broken while adding comments and changing var names