changed else if

updated