Script Combination

single script combining 2 previous scripts.