Fixed code. Passes unit test.