updated a bunch of code