Some modifications on script