code for lecture