Task 3 with working tests