move lambda to a separate module