initialized longest to None