finally fixed lambda function regex prroblems