Address PR comments: fix cast, make variable public static final, fix histogram equals
Adding serialized histogram