debug to escape loop