add tweaked version of lecture 15 from master