add a guard to check whether `self.format` is already set?