only require environment if needed
better progressbar