updates to make script more readable