added format option to command