functions: numerical integration WIP