shouldn't this be an else if ?