some optimizings