* added test code
* re-setting the ir code after it was consumed