adding support for memory model