An algebraic approach to the generalized Whitehead group