change back from std::unique_ptr to boost::scoped_ptr for inter platform compatibility