calculus added; needs testing still