implemented a subset of required ir generation