fixed hash implementation