A little bit of code optimization