error plotting works