IR some function related stuffs