removing a lot of the code