Implementation of a progress bar