problem 11; big thanks to gilbertw1, TEttinger and noonian