add ptr cast