modified convert.py