more reliable extraction of options