Complete(?) third solution for problem 1.