added some more optimization...