here the old code aligns to center.  should  I set flag to zero?