replace functions wrappers in when/then