refactor tenki