calculate condition's order