much simpler hashing (probably more efficient too)