added some functions with progress bar