switch from a block to a lambda to enable a one-line method call