implement emplace and unit test.