replace flag parser with goptions