added generateData functionality