Adding progress_bar function