Use lambda instead of string to evaluate logic