added basic hashing function