Updated solution for exercise 1