move script to inside head tag