reduce redundant codes