simplify the condions lambda generation