Working test version of the id hash calculation