added function which must be the calculation endpoint