add closure and ir modle