tweaked the script a little