reformat variables