a few optimizations.
no need to compute norm(hb,Inf) twice.