use auto ptr for all c pointer