function calculatetonjur in progress