Added lengthoflastword function.