A little optimization