added hash function