added logging to calculate