add exemple with ptr