finished section 2 of the tutorial