update to handle badge as object