Added loop option