fixed counting and display