output fix, plotting script