separate datagen and topo