updated convert.erl