added table to example using a control generating function