added createfigure