delete redundant  codes