simply fixed tabs and changed some for loops for clarity