created method calculateCo2Consumption based only on distance