split into format.py