Add replica hash function