finished section 4 of tutorial