added some brake/repair code