Replaced code

Code is now from what we did in class on Tuesday.