fixed direction lookup so AES encrypt and decrypt are called at the right moments