fix converter and add some tests
merge