Deleted wrong calc_AB functions