improves graph generation