find the minimal value without 'if'
using getopt() function to handle arguments
using getopt_long() to handle arguments