better way to generate using product