updated counting