made the example recursive, until break out by quit