calculation implemented debugging