First version where it actually calculates hash values.