make it shut up when debug is false, first stab at answering the optimization question with a plot