finding the greatest number with lambda function