added prepare function
Added fancy progressbar