optimizations + analytics