added header and footer scripts to functions file