much better impl of dynamic { } which doesn't throw away known type info