Moved lecture code