fixes #6 and all tests pass, only 6 so far...