changed script a bit