Version 2 of the exercise