moved script to file