move normal cases out of context block for encrypt and decrypt methods