migrated to new save-text function