add support for setting memory