solution to lengthOfLastWord