plotting scripts
important bug fix