Solves problem 25
Solves problem 48