refact option action and fix #30