Week 9 function writing update