started some work on making matrix versions of enc/dec operations