initprogress method refactored and tests added