actually solved problem 13 with a terrible problem statement