Made plotting optional