added reest and running count