added a bunch of code