i took HOURS, for nothing, i deleted all the complex but useless code and this is the best i could do