starting to adapt the crypto library