refactored progress and it is working