change calculation logic