add runing time measure to test the efficiency
modify code style