added showProgress function