added header and function checks
added header and function checks