Changed getopt datatype to int from float