use flags into func main