use functor for 'When' clauses