Minor optimalistion