implemented swap, assign, constructors