move script to header