add in optimizations