added mem lib