Extended example to show all options and support tolerance