add badges and corresponding logic