move flag parsing out of expac_new
simplify search