give badges logic