added hash implementation