restored header_function.sql and modified header.py