adds functioning method for gets_longest