Added set_format method