implemented move semantics