got rid of the global var @progressbar