adding basic Idea of mem management