using weak_ptr and shared_ptr for singleton