Added solution and tests.