working on making code more DRY [12809037]