changed script a little