if else top three table