capusulate memery functions