looks like ```j``` and ```i``` are mixed up