Creating the Lambda function