starting to plot velocity, added error checking stuff