Solution for week6