add fabric generation function