make example more flexible