fixed graph generation