added mem.py