add judgment before assert