created progress-bar method