added infinite loops with til limit