added statusupdate and waitcursor for plotting