added in encryption method to testing branch