added switch to make plots or not