re-organize example to make nicer