add support for memory

@ibuildthecloud