improve running time

improve running time