simple progress bar rendering code