fixed ir code, encoder code
merge