it now runs, note: i and j are not the same