hopefully further improved text insertion into loops