change badge number calculation