use observer to update badge