cast here to avoid the closure on ev.