made some server optimizations