Added hash2
Implemented has2, synced with pm3 code