changed whole script