some small optimize