added loop for plotting all variables