optimizations part 2