Coding the Lambda function