Added solution and test for P8.10