Added support for custom formatting