changed options to opts