check has loop