refactoring for get-opts