implement non-recursive node deleteion