added progress bars
fixed nasty plotting error