pubkey functionality (rough)