Revert "Revert "functions""

This reverts commit 5c41c439d4f8715e9ec62bdefdcfe0a168f3c106.