add longoption , refactor 1