improved a script