- simpler code with the help of std::swap
- less code