Week 4 template code