make hash function simpler