Add logging enhacement
Improve calculations