Exercise 3, REVC solution