added progressbar and fixed bugs