added f option to getopt