update seventh answer with nodeschool's code