calculus working