same condition being checked twice