Week 1 solution by mwynholds