simple solution for length of last word