Changed loops + removed sysouts