I see, I wonder if you have a code snippet for this calculation. If not, could you give me a hint how to do this?