new function from Jim
integrate with Jim