Algorithm is basically done, needs toggling and to be better, also there is a syntax error, fuck that