why are you modifying options? I would think of options as something that doesn't expect to be changed by the calling function