handle the LOOP error
add more precedence