Tweaked code to not accept irrevelant input (i.e. user must enter y, n, p, r, or s only.