- some changes to use move semantics