add evaluate pattern in if logic.