refactored progress indicator