adding -f option to control output format