fixed a constructor
smartpointer has better copy constructor