imported solutions from week5 for week8