add decipher
added some error/sanity checking