removed need for prevHeaderLines by evaluating header and source separately