code rearrangement for color markers