output type check added