Move to use lambda, to keep pylint happy