adding changes from Mote's branch
returning custom wsmode, based on state.RangedMode