added memory manager
this is the correct memory manager
added memory_manager and function_manager