Changed hash check function to remove casting

Still does not eliminate partitions. C needs to be checked