computing dbhash once