performance optimizaitons