added detection for memory pattern