debug on loop