replace lambda logic!