changed  main script