Added checkColumnheadings function