train and bus calculations