Functional version of b789eeb