condition tests were all wrong