used ir_type instead of type