move script into head