write a converter