implement transformation for conditions and memory operations