did some modifications to the plotting