testing and producing plots