Modifications to convert.py