lecture 9 slides & codes