removed nested if, not necessary
simplified progress test