redone converter and refactoring