improve option handling

Use enum class instead.