Lesson 1 Step 5 (Exception handling improved + refactoring)