move some functions to utils.R and progress.R