Use a more efficient calculation method