added comments for IR generation