added HASH_REPLACE macros