Added pHash functionality