consolidate the wrap mode option into three modes inject, wrap, and unwrap