added diagnostic plot