simplified hash computation