Reatached script to main.xml