improve benchmark codes