FIXED BUG TASK 2 AND TASK 3