Code for the manual tutorialΒΆ