move some script into head