I got the code to pass all current tests. need to write more tests.