Adding I to control. Changed format of algo some.