moving script into head