expand tuplegen