finished enc,just need to add failsave