i spent twice the amount of time debugging the code as i did actually writing it. fun.
supposedly everything should work and if it doesnt i will cry.