add infinite loop option