NEW: data preprocessing read_variables