redo some of the crypto sections