fixed edge case for question 8