include format.h only where necessary.