Added solution for problem #8