gave the Grid a shared_ptr