add switch for graph generation