stop condition for curl