implement multisig and p2sh signing