more logical hash checking