problem 9

theres definitely a better solution...