updated for new libsnarl.