code for verification of heading function.