adjusted R script prog ass 2