refactor mongo2toku a little #311