returns wout (index, weight)