adding head script and foot script