Added script funciton