added badge number checking