made options.format a switch statement