use lighter extend in setOptions, simplify extend