revamped badge code