Code for lectures