progress on CounterPtr cast