added hash validation