Simplify exercise 4