handle Ptr in switch