Added a better solution for Exercise 1-3