optimizations and updates