finished plotting and simulation