refactor script
add badgeText