changed function names to generateFigures