changed way script was created