Update serialize.py