improving operation, now all tests pass