improved badge initialization