add dynamic insertion for head files