add generate products func