progress more or less working now according to logic