add else if to the indes