move script to head