@rewrite memory manager(70%)