added a format method