using a new method for creating scripts, saved lot of space, code is cleaner