fixed it up and made it actually work