make script flexiable and plot all different process types