extract option in a better way