added infinite loop parsing