opts handling