added header checks