Implemented server-side calculation.