rewrite for hazelcast