lectures 21 and 23