removed old script funtion