wow that's some of the shittiest code ive written