reduce codes