sort out codes.