add badge and append to badge
refactored events outside of badges