added check for header