setting progressbar before starting search