fix script and add table header