rolling back the patch for the test now that we figure the issue
some extra improvements, removing unnecessarily copies of conditions