add some options and refactor

1