started work on progressbar and record progress
NOT WORKING!