handle options object