added a bunch of shitty javascript that Ill need to fix later