various functions related to car calculations