made minor changes from Patrick's notes