swapped i with j