lecture3 modified