Improving the lambda functions