Moved getFormat to a public format method