#13 straight forward solution but works well
#14 straight-forward solution, needs refactoring