added saving figure