Adding to Taylor's Week 4 code