updated to plotting figure