added changes to figures.py