not sure what's wrong with calculate_newton_basis