TODO sweeping. Accept functions in some numeric params