Hello everyone, i am new to this forum, but I've been using arduino for a while now, however i have been using it only for small and simple stuff, but recently i found a very simple (or so it seemed) video about an led matrix with shift registers, i don't quite fully understand how they work, tho i watched a few videos. now, i have 2 problems, the project is for 8x24, but i only had leds for a 8x16 matrix, thought that the code would still work an i would be able to use it just like this, the second problem is that in the schematic they don't show the led polarity...so i just put them with anodes on rows, plugged it in, changed my output pins, because it was easier to connect them differently on the pcb, and gave it a go...and my matrix is fully on, and only flickers a bit when i turn the speed potentiometer. here is the schematic and the code, any idea is welcome, except the idea of rebuilding the matrix

If i have to modify the whole code, just help me out with one character and i will do the rest
...the code is too long and i can't post it as a code