make a little code optimization