improved heading recognition; editing added