small code optimization