updated code to save figures in color too