Ran lecture code