refactored converter