initial attempt at problem 13