Added support for format parameter.