A little improvement to my script