plotting and testing