refactor badges