p64 impl and test