Finished code to accomodate thruster failures