IR_final version

In order to avoid the miss the code once again, I push the code at
once. This version goes smoothly and function well.