a ton of addtions and optimizations