replace 'lambda' with 'expect'