Updated for new $format argument