added mem-functions