fix for code in lecture 3