write setopt here