log function in header added