Adding key extraction from request for all calculations