fixed tabs and spacing, updated variable assignment, reduced array push calls