added some track drawing code