added counter to prove that pixels are being iterated. replaced incorrect for loop with doseq.