refactor convert_types
Merge pull request #753 from kostya/convert_type

refactor convert_types