added print progress functionality