Fixed to match lecture #3