Adding support for memory

Support for memory