fixed all bugs and displayed the badge criteria correctly