updated smartptr,still a bit puzzled...