working function_manager and memory_manager