audit code, all tests pass