updated a lot of functions
And I'm an idiot