first two tutorial sections, initial code