updated plotting and tests