improved tests, added test, all tests pass