fixing quiz 2 logic