mem functions