Added calculation in the client.