module: diagram generator