add code from slides