added hash check