Red-black implementation